﻿using System.Collections.Generic;
using Microsoft.CodeAnalysis;

namespace Beeflys.Generator
{
    
    sealed class UClass : UStruct
    {
        public UClass(ITypeSymbol symbol, List<string> imports, Reflect reflect)
            : base(symbol, imports, reflect)
        {
        }
        
        public override TypeOptions Options
        {
            get { return TypeOptions.CLASS; }
        }

        public UClass BaseType { get; private set; }

        protected override void Parse(ITypeSymbol symbol)
        {
            base.Parse(symbol);

            // this.BaseTypeParse(symbol);
        }

        private void BaseTypeParse(ITypeSymbol typeSymbol)
        {
            if (typeSymbol.BaseType == null)
            {
                return;
            }
            
            this.BaseType = (UClass)typeSymbol.BaseType.AsUtype(this.Imports, reflect);
        }
    }
}